<script type="text/javascript" src="/piger/system/userList.js"></script>
<div id="userList">
    <div class="layui-form">
        <div class="cms-search-item">
            <label class="layui-form-label">关联角色</label>
            <div class="layui-input-block">
                <select id="userList-select-role" lay-search></select>
            </div>
        </div>
        <div class="cms-search-item">
            <label class="layui-form-label">是否禁用</label>
            <div class="layui-input-block">
                <select id="userList-select-locked">
                    <option value=""></option>
                    <option value="true">是</option>
                    <option value="false">否</option>
                </select>
            </div>
        </div>
    </div>
    <button id="userList-search-btn" class="layui-btn cms-btn-width"><i class="layui-icon layui-icon-search">&nbsp;</i>搜索
    </button>
    <button id="userList-refresh-btn" class="layui-btn cms-btn-width"><i
            class="layui-icon layui-icon-refresh">&nbsp;</i>刷新
    </button>
    <button id="userList-add-btn" class="layui-btn cms-btn-width">添加</button>
</div>
<table id="userList-table" lay-filter="userList-table"></table>
</div>
<script type="text/html" id="userList-locked-col-tpl">
    {{# if (d.locked == true) { }}
    <span style="color: red">是</span>
    {{# } else { }}
    <span>否</span>
    {{# } }}
</script>
<script type="text/html" id="userList-toolbar">
    <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="reset">刷新</button>
    <button class="layui-btn layui-btn-xs" lay-event="edit">编辑</button>
    {{# if (d.locked == true) { }}
    <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="enable">启用</button>
    {{# } else { }}
    <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="disable">禁用</button>
    {{# } }}
    <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</button>
</script>